const axios = require("axios");
const apiUrl1 =
  "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=60dc4e97-0f75-4fc3-8aba-420a0e8b4112";
  
function qywx(){
    axios
    .post(apiUrl1, {
      msgtype: "news",
      news: {
        articles: [
          {
            title: `警告,设备已掉线${formattedTime}`,
            description: `时间:${formattedTime}`,
            url: "https://static-mp-6e448d05-1c65-466c-955e-3663779b9553.next.bspapp.com",
            picurl:
              "https://mp-6e448d05-1c65-466c-955e-3663779b9553.cdn.bspapp.com/cloudstorage/高达系列④壁纸5.png",
          },
        ],
      },
    })
    .then((response) => {
      console.log("POST 请求成功:", response.data);
    })
    .catch((error) => {
      console.error("POST 请求失败:", error);
    });
}

qywx();